from appium.webdriver.common.mobileby import MobileBy

from lagou.appium_exercise4.pages.address_list_page import AddressListPage
from lagou.appium_exercise4.pages.base_page import BasePage


class MainPage(BasePage):
    addaddress_ele = (MobileBy.XPATH, "//*[@text='通讯录']")
    def goto_addresslist(self):
        # 点击通讯录
        self.find_and_click(*self.addaddress_ele)

        return AddressListPage(self.driver)